inherited dtmxs_TemplateMaster: Tdtmxs_TemplateMaster
  OldCreateOrder = True
  Left = 664
  Top = 286
  Height = 556
  Width = 763
  inherited adsMaster: TADODataSet
    CursorType = ctStatic
    CommandText = 'select * from V_xs_TemplateMaster where 0=1'
    object adsMasterBillID: TStringField
      DisplayLabel = #20027#38190'ID'
      FieldName = 'BillID'
    end
    object adsMasterBillNO: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'BillNO'
    end
    object adsMasterBillType: TStringField
      DisplayLabel = #21333#25454#31867#22411
      FieldName = 'BillType'
    end
    object adsMasterBillDate: TDateTimeField
      DisplayLabel = #26085#26399
      FieldName = 'BillDate'
    end
    object adsMasterProcessID: TStringField
      DisplayLabel = #31867#22411'ID'
      FieldName = 'ProcessID'
    end
    object adsMasterProcessName: TStringField
      DisplayLabel = #31867#22411
      FieldName = 'ProcessName'
      Size = 50
    end
    object adsMasterCustID: TStringField
      DisplayLabel = #23458#25143'ID'
      FieldName = 'CustID'
    end
    object adsMasterCustCode: TStringField
      DisplayLabel = #23458#25143#32534#30721
      FieldName = 'CustCode'
    end
    object adsMasterCustShortName: TStringField
      DisplayLabel = #23458#25143#21517#31216
      FieldName = 'CustShortName'
    end
    object adsMasterSupplyID: TStringField
      DisplayLabel = #20379#24212#21830'ID'
      FieldName = 'SupplyID'
    end
    object adsMasterSupplyCode: TStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 'SupplyCode'
    end
    object adsMasterSupplyShortName: TStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 'SupplyShortName'
    end
    object adsMasterHasCheck: TBooleanField
      DisplayLabel = #23457#26680#21542
      FieldName = 'HasCheck'
    end
    object adsMasterChecker: TStringField
      DisplayLabel = #23457#26680#20154
      FieldName = 'Checker'
    end
    object adsMasterCheckTime: TDateTimeField
      DisplayLabel = #23457#26680#26102#38388
      FieldName = 'CheckTime'
    end
    object adsMasterWriter: TStringField
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object adsMasterWriteTime: TDateTimeField
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object adsMasterModifier: TStringField
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object adsMasterModifyTime: TDateTimeField
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object adsMasterRemark: TStringField
      DisplayLabel = #22791#27880
      FieldName = 'Remark'
      Size = 500
    end
  end
  inherited adsMasterEdit: TADODataSet
    CursorType = ctStatic
    CommandText = 'select * from xs_TemplateMaster'
    object adsMasterEditBillID: TStringField
      DisplayLabel = #20027#38190'ID'
      FieldName = 'BillID'
    end
    object adsMasterEditBillNO: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'BillNO'
    end
    object adsMasterEditBillType: TStringField
      DisplayLabel = #21333#25454#31867#22411
      FieldName = 'BillType'
    end
    object adsMasterEditBillDate: TDateTimeField
      DisplayLabel = #26085#26399
      FieldName = 'BillDate'
    end
    object adsMasterEditProcessID: TStringField
      DisplayLabel = #31867#22411'ID'
      FieldName = 'ProcessID'
    end
    object adsMasterEditCustID: TStringField
      DisplayLabel = #23458#25143'ID'
      FieldName = 'CustID'
    end
    object adsMasterEditSupplyID: TStringField
      DisplayLabel = #20379#24212#21830'ID'
      FieldName = 'SupplyID'
    end
    object adsMasterEditHasCheck: TBooleanField
      DisplayLabel = #26159#21542#23457#26680
      FieldName = 'HasCheck'
    end
    object adsMasterEditChecker: TStringField
      DisplayLabel = #23457#26680#20154
      FieldName = 'Checker'
    end
    object adsMasterEditCheckTime: TDateTimeField
      DisplayLabel = #23457#26680#26102#38388
      FieldName = 'CheckTime'
    end
    object adsMasterEditWriter: TStringField
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object adsMasterEditWriteTime: TDateTimeField
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object adsMasterEditModifier: TStringField
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object adsMasterEditModifyTime: TDateTimeField
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object adsMasterEditRemark: TStringField
      DisplayLabel = #22791#27880
      FieldName = 'Remark'
      Size = 100
    end
    object adsMasterEditRes_CustCode: TStringField
      DisplayLabel = #23458#25143#32534#30721
      FieldKind = fkLookup
      FieldName = 'Res_CustCode'
      LookupDataSet = res_Customer
      LookupKeyFields = 'CustID'
      LookupResultField = 'CustCode'
      KeyFields = 'CustID'
      Lookup = True
    end
    object adsMasterEditRes_CustName: TStringField
      DisplayLabel = #23458#25143#21517#31216
      FieldKind = fkLookup
      FieldName = 'Res_CustName'
      LookupDataSet = res_Customer
      LookupKeyFields = 'CustID'
      LookupResultField = 'CustShortName'
      KeyFields = 'CustID'
      Lookup = True
    end
    object adsMasterEditres_SupplyName: TStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldKind = fkLookup
      FieldName = 'res_SupplyName'
      LookupDataSet = res_Supply
      LookupKeyFields = 'SupplyID'
      LookupResultField = 'SupplyShortName'
      KeyFields = 'SupplyID'
      Size = 50
      Lookup = True
    end
    object adsMasterEditres_ProcessName: TStringField
      DisplayLabel = #31867#22411
      FieldKind = fkLookup
      FieldName = 'res_ProcessName'
      LookupDataSet = res_Process
      LookupKeyFields = 'ProcessID'
      LookupResultField = 'ProcessName'
      KeyFields = 'ProcessID'
      Size = 50
      Lookup = True
    end
  end
  object adsDetail: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    BeforePost = adsDetailBeforePost
    OnNewRecord = adsDetailNewRecord
    CommandText = 'select * from xs_TemplateDetail where 0=1'
    Parameters = <>
    Left = 160
    Top = 40
    object adsDetailID: TStringField
      DisplayLabel = #24207#21495
      FieldName = 'ID'
    end
    object adsDetailBillID: TStringField
      DisplayLabel = #20851#32852'ID'
      FieldName = 'BillID'
    end
    object adsDetailTempType: TStringField
      Tag = 2
      DisplayLabel = #25171#29256#31867#22411
      FieldName = 'TempType'
    end
    object adsDetailProductID: TStringField
      Tag = 2
      DisplayLabel = #36135#21495'ID'
      FieldName = 'ProductID'
      OnChange = adsDetailProductIDChange
    end
    object adsDetailProductCode: TStringField
      Tag = 2
      DisplayLabel = #36135#21495
      FieldName = 'ProductCode'
      Size = 50
    end
    object adsDetailProductName: TStringField
      Tag = 2
      DisplayLabel = #36135#21517
      FieldName = 'ProductName'
      Size = 50
    end
    object adsDetailSpecs: TStringField
      DisplayLabel = #22411#21495#35268#26684
      FieldName = 'Specs'
      Size = 200
    end
    object adsDetailCustProductCode: TStringField
      Tag = 2
      DisplayLabel = #23458#25143#36135#21495
      FieldName = 'CustProductCode'
      Size = 50
    end
    object adsDetailCustProductName: TStringField
      Tag = 2
      DisplayLabel = #23458#25143#36135#21517
      FieldName = 'CustProductName'
      Size = 100
    end
    object adsDetailColorID: TStringField
      DisplayLabel = #33394#21495'ID'
      FieldName = 'ColorID'
    end
    object adsDetailColorCode: TStringField
      DisplayLabel = #33394#21495
      FieldName = 'ColorCode'
    end
    object adsDetailColorName: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
      Size = 50
    end
    object adsDetailCustColor: TStringField
      DisplayLabel = #23458#25143#39068#33394
      FieldName = 'CustColor'
      Size = 50
    end
    object adsDetailCustSpecs: TStringField
      DisplayLabel = #23458#25143#35268#26684
      FieldName = 'CustSpecs'
      Size = 50
    end
    object adsDetailOrderDetailNo: TStringField
      DisplayLabel = #35746#21333#26126#32454#21333#21495
      FieldName = 'OrderDetailNo'
    end
    object adsDetailHasRestore: TBooleanField
      DisplayLabel = #22238#22797#21542
      FieldName = 'HasRestore'
    end
    object adsDetailRestoreMemo: TStringField
      DisplayLabel = #22238#22797#35828#26126
      FieldName = 'RestoreMemo'
      Size = 500
    end
    object adsDetailRestorer: TStringField
      DisplayLabel = #22238#22797#20154
      FieldName = 'Restorer'
    end
    object adsDetailRestoreTime: TDateTimeField
      DisplayLabel = #22238#22797#26102#38388' '
      FieldName = 'RestoreTime'
    end
    object adsDetailWriter: TStringField
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object adsDetailWriteTime: TDateTimeField
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object adsDetailModifier: TStringField
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object adsDetailModifyTime: TDateTimeField
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object adsDetailRemark: TStringField
      DisplayLabel = #25171#26679#35201#27714
      FieldName = 'Remark'
      Size = 500
    end
  end
  object res_Customer: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 
      'select CustID,CustCode, CustFullName,CustShortName from da_Custo' +
      'mer'
    Parameters = <>
    Left = 160
    Top = 184
  end
  object adsSelect: TADODataSet
    Connection = dtmConnect.conMain
    Parameters = <>
    Left = 160
    Top = 248
  end
  object frdsSelect: TfrDBDataSet
    DataSet = adsSelect
    Left = 56
    Top = 248
  end
  object frdsDetail: TfrDBDataSet
    DataSet = adsDetail
    Left = 160
    Top = 104
  end
  object res_Supply: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 'select SupplyID, SupplyCode, SupplyShortName from da_Supply'
    Parameters = <>
    Left = 264
    Top = 256
  end
  object res_Process: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 'select ProcessID, ProcessCode, ProcessName from da_Process'
    Parameters = <>
    Left = 264
    Top = 176
  end
  object adsProcess: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 
      'select ProcessID, ProcessCode, ProcessName from da_Process'#13#10'  wh' +
      'ere isnull(HasCheck,0)=1 and isnull(HasStop,0)=0 and (isnull(Has' +
      'Process,0)=1 and isnull(HasSendOut,0)=1 or isnull(ProcessID,'#39#39')=' +
      #39'10'#39')'#13#10'order by ProcessCode'
    Parameters = <>
    Left = 264
    Top = 112
  end
  object adsBrowseDetail: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 'select * from xs_TemplateDetail where 0=1'
    Parameters = <>
    Left = 264
    Top = 40
    object StringField1: TStringField
      DisplayLabel = #24207#21495
      FieldName = 'ID'
    end
    object StringField2: TStringField
      DisplayLabel = #20851#32852'ID'
      FieldName = 'BillID'
    end
    object StringField3: TStringField
      Tag = 2
      DisplayLabel = #25171#29256#31867#22411
      FieldName = 'TempType'
    end
    object StringField4: TStringField
      Tag = 2
      DisplayLabel = #36135#21495'ID'
      FieldName = 'ProductID'
      OnChange = adsDetailProductIDChange
    end
    object StringField5: TStringField
      Tag = 2
      DisplayLabel = #36135#21495
      FieldName = 'ProductCode'
      Size = 50
    end
    object StringField6: TStringField
      Tag = 2
      DisplayLabel = #36135#21517
      FieldName = 'ProductName'
      Size = 50
    end
    object adsBrowseDetailSpecs: TStringField
      DisplayLabel = #22411#21495#35268#26684
      FieldName = 'Specs'
      Size = 200
    end
    object StringField7: TStringField
      Tag = 2
      DisplayLabel = #23458#25143#36135#21495
      FieldName = 'CustProductCode'
      Size = 50
    end
    object StringField8: TStringField
      Tag = 2
      DisplayLabel = #23458#25143#36135#21517
      FieldName = 'CustProductName'
      Size = 100
    end
    object StringField9: TStringField
      DisplayLabel = #33394#21495'ID'
      FieldName = 'ColorID'
    end
    object StringField10: TStringField
      DisplayLabel = #33394#21495
      FieldName = 'ColorCode'
    end
    object StringField11: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
      Size = 50
    end
    object StringField12: TStringField
      DisplayLabel = #23458#25143#39068#33394
      FieldName = 'CustColor'
      Size = 50
    end
    object StringField13: TStringField
      DisplayLabel = #23458#25143#35268#26684
      FieldName = 'CustSpecs'
      Size = 50
    end
    object StringField14: TStringField
      DisplayLabel = #35746#21333#26126#32454#21333#21495
      FieldName = 'OrderDetailNo'
    end
    object BooleanField1: TBooleanField
      DisplayLabel = #22238#22797#21542
      FieldName = 'HasRestore'
    end
    object StringField15: TStringField
      DisplayLabel = #22238#22797#35828#26126
      FieldName = 'RestoreMemo'
      Size = 500
    end
    object StringField16: TStringField
      DisplayLabel = #22238#22797#20154
      FieldName = 'Restorer'
    end
    object DateTimeField1: TDateTimeField
      DisplayLabel = #22238#22797#26102#38388' '
      FieldName = 'RestoreTime'
    end
    object StringField17: TStringField
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object DateTimeField2: TDateTimeField
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object StringField18: TStringField
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object DateTimeField3: TDateTimeField
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object StringField19: TStringField
      DisplayLabel = #25171#26679#35201#27714
      FieldName = 'Remark'
      Size = 500
    end
  end
  object adsTemplateDetail: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    AfterOpen = adsTemplateDetailAfterOpen
    CommandText = 'select * from V_xs_TemplateDetail where 0=1'
    Parameters = <>
    Left = 384
    Top = 40
    object StringField20: TStringField
      DisplayLabel = #24207#21495
      FieldName = 'ID'
    end
    object StringField21: TStringField
      DisplayLabel = #20851#32852'ID'
      FieldName = 'BillID'
    end
    object adsTemplateDetailBillNo: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'BillNo'
    end
    object adsTemplateDetailBillDate: TDateTimeField
      DisplayLabel = #26085#26399
      FieldName = 'BillDate'
    end
    object adsTemplateDetailBillType: TStringField
      DisplayLabel = #21333#25454#31867#22411
      FieldName = 'BillType'
    end
    object adsTemplateDetailProcessID: TStringField
      DisplayLabel = #31867#22411'ID'
      FieldName = 'ProcessID'
    end
    object adsTemplateDetailProcessName: TStringField
      DisplayLabel = #31867#22411
      FieldName = 'ProcessName'
      Size = 50
    end
    object adsTemplateDetailCustID: TStringField
      DisplayLabel = #23458#25143'ID'
      FieldName = 'CustID'
    end
    object adsTemplateDetailCustCode: TStringField
      DisplayLabel = #23458#25143#32534#30721
      FieldName = 'CustCode'
    end
    object adsTemplateDetailCustShortName: TStringField
      DisplayLabel = #23458#25143#21517#31216
      FieldName = 'CustShortName'
    end
    object adsTemplateDetailSupplyID: TStringField
      DisplayLabel = #20379#24212#21830'ID'
      FieldName = 'SupplyID'
    end
    object adsTemplateDetailSupplyCode: TStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 'SupplyCode'
    end
    object adsTemplateDetailSupplyShortName: TStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 'SupplyShortName'
    end
    object adsTemplateDetailHasCheck: TBooleanField
      DisplayLabel = #23457#26680#21542
      FieldName = 'HasCheck'
    end
    object StringField22: TStringField
      Tag = 2
      DisplayLabel = #25171#29256#31867#22411
      FieldName = 'TempType'
    end
    object StringField23: TStringField
      Tag = 2
      DisplayLabel = #36135#21495'ID'
      FieldName = 'ProductID'
      OnChange = adsDetailProductIDChange
    end
    object StringField24: TStringField
      Tag = 2
      DisplayLabel = #36135#21495
      FieldName = 'ProductCode'
      Size = 50
    end
    object StringField25: TStringField
      Tag = 2
      DisplayLabel = #36135#21517
      FieldName = 'ProductName'
      Size = 50
    end
    object adsTemplateDetailSpecs: TStringField
      DisplayLabel = #22411#21495#35268#26684
      FieldName = 'Specs'
      Size = 200
    end
    object StringField26: TStringField
      Tag = 2
      DisplayLabel = #23458#25143#36135#21495
      FieldName = 'CustProductCode'
      Size = 50
    end
    object StringField27: TStringField
      Tag = 2
      DisplayLabel = #23458#25143#36135#21517
      FieldName = 'CustProductName'
      Size = 100
    end
    object StringField28: TStringField
      DisplayLabel = #33394#21495'ID'
      FieldName = 'ColorID'
    end
    object StringField29: TStringField
      DisplayLabel = #33394#21495
      FieldName = 'ColorCode'
    end
    object StringField30: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
      Size = 50
    end
    object StringField31: TStringField
      DisplayLabel = #23458#25143#39068#33394
      FieldName = 'CustColor'
      Size = 50
    end
    object StringField32: TStringField
      DisplayLabel = #23458#25143#35268#26684
      FieldName = 'CustSpecs'
      Size = 50
    end
    object StringField33: TStringField
      DisplayLabel = #35746#21333#26126#32454#21333#21495
      FieldName = 'OrderDetailNo'
    end
    object BooleanField2: TBooleanField
      DisplayLabel = #22238#22797#21542
      FieldName = 'HasRestore'
    end
    object StringField34: TStringField
      DisplayLabel = #22238#22797#35828#26126
      FieldName = 'RestoreMemo'
      Size = 500
    end
    object StringField35: TStringField
      DisplayLabel = #22238#22797#20154
      FieldName = 'Restorer'
    end
    object DateTimeField4: TDateTimeField
      DisplayLabel = #22238#22797#26102#38388' '
      FieldName = 'RestoreTime'
    end
    object StringField36: TStringField
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object DateTimeField5: TDateTimeField
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object StringField37: TStringField
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object DateTimeField6: TDateTimeField
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object StringField38: TStringField
      DisplayLabel = #25171#26679#35201#27714
      FieldName = 'Remark'
      Size = 500
    end
  end
end
